﻿using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

namespace AVCJobDispatcherLinux
{
    /// <summary>
    /// 启动类
    /// </summary>
    class Program
    {
        /// <summary>
        /// 启动方法
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            // 构造 host
            var host = new HostBuilder()
                .ConfigureServices((context, services) => {
                    services.AddHostedService<JobHostedService>(); // 添加host 服务
                })
                .UseConsoleLifetime()
                .Build();

            host.Run();
        }
    }
}